package Magnitudes;

public class Pesos extends Money {

	public Pesos(double pesos) {
		this.amount = pesos;
		this.symbol = "$";
	}

	public double amount() {
		return this.amount;
	}

	public Pesos add(Money money) {
		return (new Pesos(this.amount() + money.amount()));
	}

	public Pesos sub(Money money) {
		return (new Pesos(this.amount() - money.amount()));
	}

	public Pesos addPercentage(Percentage percentage) {
		double calc = this.amount()
				+ ((this.amount() * percentage.amount()) / 100);
		return (new Pesos(calc));
	}

	public Pesos subPercentage(Percentage percentage) {
		double calc = this.amount()
				- ((this.amount() * percentage.amount()) / 100);
		return (new Pesos(calc));
	}

	public boolean equals(Pesos pesos) {
		boolean retorno = false;
		if (this.amount() == pesos.amount()) {
			retorno = true;
		}
		return retorno;
	}

	public Pesos div(double d) {
		double calc = this.amount/d;
		return (new Pesos(calc));
	}

}
